using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class CamTarget : MonoBehaviour
{
    public Player player1;
    public Player player2;

    // Update is called once per frame
    void Update()
    {
        var newPos = (player1.Pos + player2.Pos) / 2.0f;
        newPos.y = 0.0f;
        newPos.x = Mathf.Clamp(newPos.x, -8.0f, 8.0f);
        transform.position = newPos;
    }
}
